package top.liuziqian.shop.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.liuziqian.common.core.text.Convert;
import top.liuziqian.shop.domain.GoodsBrand;
import top.liuziqian.shop.mapper.GoodsBrandMapper;
import top.liuziqian.shop.service.IGoodsBrandService;

import java.util.List;

@Service
public class GoodsBrandServiceImpl implements IGoodsBrandService {

    @Autowired
    private GoodsBrandMapper brandMapper;

    @Override
    public GoodsBrand selectBrandById(Long brandId) {
        return brandMapper.selectBrandById(brandId);
    }

    @Override
    public List<GoodsBrand> selectBrandList(GoodsBrand brand) {
        return brandMapper.selectBrandList(brand);
    }

    @Override
    public int insertBrand(GoodsBrand brand) {
        return brandMapper.insertBrand(brand);
    }

    @Override
    public int updateBrand(GoodsBrand brand) {
        return brandMapper.updateBrand(brand);
    }

    @Override
    public int deleteBrandByIds(String ids) {
        return brandMapper.deleteBrandByIds(Convert.toStrArray(ids));
    }
}
